import { BaseEntity } from '@cool-midway/core';
import { Column, Entity, Index } from 'typeorm';

/**
 * 描述
 */
@Entity('demand_info')
export class DemandInfoEntity extends BaseEntity {
  @Index()
  @Column({ comment: '用户ID', nullable: false })
  userId: string;

  @Index({ unique: true })
  @Column({ comment: 'UUID', nullable: true })
  uuid: string;

  @Column({ comment: '应用场景', nullable: true })
  usageScene: string;

  @Column({ comment: '应用描述', nullable: true })
  usageDesc: string;

  @Column({ comment: '系统框图URL', nullable: true, type: 'json' })
  systemDiagram: string;

  @Column({ comment: '测量仪表数组', nullable: true, type: 'json' })
  measurementInstruments: string[];

  @Column({ comment: '控制仪表数组', nullable: true, type: 'json' })
  controlInstruments: string[];

  @Column({ comment: '技术服务', nullable: true, type: 'json' })
  tecService: string[];

  @Column({ comment: '服务顾问编码', nullable: true })
  consultantCode: string;

  @Column({ comment: '订单状态0-已提交 1-已受理 2-已完成', nullable: true })
  state: number;

  @Column({ comment: '活动消息', nullable: true, type: 'json' })
  activeMessage: string[];
}
